 class MyTread implements Runnable{
     @Override
     public void run() {
         while (true) {
             System.out.println("哈喽沃尔德");
             try {
                 Thread.sleep(1000);
             } catch (InterruptedException e) {
                 e.printStackTrace();
             }
         }
     }
 }
public class ThreadDemo1 {
    public static void main(String[] args) {
        MyTread myTread = new MyTread();
        Thread thread = new Thread(myTread);
        thread.start();
        while (true) {
            System.out.println("0.0");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}



